/**
 * 服务层配置入口
 * 根据模块引用规范，通过统一配置入口导出服务模块
 */

// 导出服务模块，使用try-catch增强容错性
try {
  // 导出新闻服务
  const NewsService = require('./news/news_service.js');
  exports.NewsService = NewsService;
} catch (e) {
  console.error('导入NewsService失败', e);
  // 提供默认实现避免错误
  exports.NewsService = {
    getCateList: () => [],
    getNewsList: async () => ({ list: [], total: 0 }),
    getNewsDetail: async () => null
  };
}

try {
  // 导出管理员新闻服务
  const AdminNewsService = require('./admin/news_service.js');
  exports.AdminNewsService = AdminNewsService;
} catch (e) {
  console.error('导入AdminNewsService失败', e);
  exports.AdminNewsService = {};
}

try {
  // 导出反馈服务
  const FeedbackService = require('./feedback/feedback_service.js');
  exports.FeedbackService = FeedbackService;
} catch (e) {
  console.error('导入FeedbackService失败', e);
  exports.FeedbackService = {
    addFeedback: async () => ({ code: -1, message: '服务模块未正确加载' })
  };
}

// 其他服务模块可按需添加 